<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""DTD/xhtml1-strict.dtd">
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%@taglib uri="/WEB-INF/fmt.tld" prefix="fmt"%>
<%@taglib uri="/WEB-INF/el.tld" prefix="el"%>
<%@taglib uri="/WEB-INF/fn.tld" prefix="fn"%>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<title></title>
		<c:import url="/includes/css_inc.jsp"/>
		<c:import url="/includes/js_inc.jsp"/>
		<script>
		$(function(){
			$("#btnSave").button({
	            icons: {
	                primary: "ui-icon-disk"
	            }
			}).click(function(){
				if(validateEmpty()){
					$("#searchForm").submit();
				}
			});
			$("#btnBack").button({
	            icons: {
	                primary: "ui-icon-arrowreturnthick-1-w"
	            }
			}).click(function(){
				$("#job").val("back");
				$("#searchForm").submit();
			});
		});
		</script>
	</head>
	<body>
		<c:set var="auth" value="${el:getMapValue(menuAuth, 'ACC60106')}"/>
		<c:import url="/apps/msg.jsp"/>
		<form class="acc67-form" name="searchForm" id="searchForm" action="${pageContext.request.contextPath}/acc6" method="post">
		<input type="hidden" name="app" id="app" value="ACC60106"/>
		<input type="hidden" name="job" id="job" value="${job}"/>
		<input type="hidden" name="categoryId" id="categoryId" value="${expenseCategoryBean.categoryId}"/>
		<c:if  test="${userInfo.areaLevel=='2'}" var="isDisable"/>
		<table width="100%" class="ui-widget ui-widget-content" border="0">
			<tr>
				<th align="left" class="acc67-header ui-widget-header" colspan="2"><b>${screenCode.ACC60106}</b></th>
			</tr>
			<tr>
				<td class="bold" width="20%">รหัสหมวดการจ่าย : </td>
				<td>${expenseCategoryBean.categoryId}</td>
			</tr>
			<tr>
				<td class="bold">ชื่อหมวดการจ่าย : </td>
				<td>
					<input type="text" name="categoryName" id="categoryName" value="${expenseCategoryBean.categoryName}" ${isDisable?'disabled':''}>
					<span id="#categoryName" class="red">*</span>
				</td>
			</tr>
			<tr>
				<td class="bold" valign="top">คำอธิบายหมวดการจ่าย : </td>
				<td>
					<textarea cols="40" rows="5" name="categoryDesc" id="categoryDesc" ${isDisable?'disabled':''}>${expenseCategoryBean.categoryDesc}</textarea>
				</td>
			</tr>
			<tr>
				<td class="bold" valign="top">สถานะ : </td>
				<td>
					<c:if test="${expenseCategoryBean.active == 'Y'}" var="checkedY"/>
					<input type="radio" name="status" id="statusY" value="Y" ${checkedY ? 'checked' : ''} > ใช้งาน 
					<c:if test="${expenseCategoryBean.active == 'N'}" var="checkedN"/>
					<input type="radio" name="status" id="statusN" value="N" ${checkedN ? 'checked' : ''}> ไม่ใช้งาน
					<span id="@status" class="red">*</span>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<c:if test="${fn:contains(auth, 'U') || fn:contains(auth, 'I')}">
						<button type="button" name="btnSave" id="btnSave" class="acc67-button">บันทึกข้อมูล</button>
					</c:if>
					<button type="button" name="btnBack" id="btnBack" class="acc67-button">ย้อนกลับ</button>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>